Computer systems employ multiple memory types, including ROM, volatile rapid access memories and non-volatile memories. ROM may be used to implement a basic input output system (a.k.a. BIOS) by having a power on reset circuit that causes the information stored in the ROM to be read and employed by a processor when the power is reset to the computer system. This is an example of a non-volatile memory, or a memory that retains stored data even when no electrical power is being supplied to the computer system.
Volatile rapid access memories, such as cache memories and dynamic random access memories (DRAMs), are used to store information elements such as data and instructions, and especially those information elements that are repeatedly needed by the processor. Volatile memories are incapable of storing data for any significant period of time in the absence of externally-supplied electrical power.
Computer systems typically include multiple non-volatile memory devices, which have evolved from punch card decks and paper tape systems, through large magnetic disc systems to include compact disc memories, floppy discs, small, high capacity disc systems, flash memory systems and other forms of non-volatile data storage devices.
Disc drive data storage systems are typically much slower than many other types of memory but provide high data storage capacity in a relatively attractive form factor and at a relatively low cost per stored bit. These types of memories include electromechanical components, and, accordingly, are limited in speed of operation. As a result, the probability that a power interruption may occur when data are being written to the device is increased, relative to some other types of memory. In order to be able to determine which data were written to the disc, and to be able to determine where on the disc the stored data are located, a file allocation table (FAT) system is employed. Several different kinds of FATs have been developed, including FAT12, 16 and 32, to address needs of different systems.
In a conventional FAT file system, when a file is modified, new data or changes to an existing file are written over and/or appended to a previous version of the file. Additionally, a log file is created of operations that will involve writing data to the non-volatile data storage device. Following writing of the new data or changes, the FAT is updated and the log is erased. Such FAT file systems track completed transactions, and are called “transactioned” file systems.
The conventional FAT file system is vulnerable to corruption from a “tom writer”, e.g., a write operation that is interrupted such as by an intervening power loss, or when storage media are disconnected during a write, because of the procedure used to store data. Should power fail after initiation of a write of new data to a file, but before or during the corresponding FAT write operation, the entire file system can be damaged or destroyed. While the likelihood of complete file system loss is small, there is a large probability of lost cluster chains that will require some form of servicing by a utility such as scandisk or chkdsk.
FAT file systems by design are not transaction-safe file systems. The FAT file system can be corrupted when a write operation is interrupted during a write transaction due to power loss or removal of the storage medium. The FAT is corrupted when the content of the FAT does not agree with the contents of the directory or data sections of the volume. When this happens, the user will lose some data.
This is not desirable in certain computer systems, such as those embedded is computer systems where the data integrity is a high priority requirement. In order to reduce these data corruption issues, a new FAT solution is needed for such computer systems that also allows existing systems to access the storage medium and that is compatible with existing systems.